package com.luo.storage.controller;

import com.luo.storage.model.domain.Result;
import com.luo.storage.model.domain.Role;
import com.luo.storage.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("/list")
    public Result getAllRole(){
        List<Role> roleList = roleService.list();
        return Result.success(roleList);
    }


}
